<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class FeedbackCategory extends Model
{
    //
    protected $table = "feedback_category";
    public $timestamps = false;

    /**
     * 根据id获取分类名称
     * @param $id
     * @return mixed
     */
    public static function getFeedbackCategoryName($id)
    {
        $res = self::where('id',$id)->select('name')->first();
        return $res->name;
    }

    public static function getAllCateGory()
    {
        $res = self::orderBy('rank','DESC')->get();
        return $res;
    }
}
